{% extends TEMPLATE_BASE %}

{% block content %}
  <h2 class="title">{{election.name}} &mdash; Bulk Upload Voters <span style="font-size:0.7em;">[<a href="{% url "election@view" election.uuid %}">back to election</a>]</span></h2>

<form method="post" action="" id="upload_form" enctype="multipart/form-data">
<p>
    If you would like to specify your list of voters by name and email address,<br />
    you can bulk upload a list of such voters here.<br /><br />

    Please prepare a text file of comma-separated values with the fields:
</p>
<pre>
   password,&lt;unique_id&gt;,&lt;email&gt,&lt;full name&gt;
</pre>
<p>
or
</p>
<pre>
   github,&lt;username&gt;
</pre>

<p>
For example:
  </p>
  <pre>
      password,bobsmith,bob@acme.org,Bob Smith
      github,benadida
      ...
  </pre> 

  <p>
    The easiest way to prepare such a file is to use a spreadsheet program and to export as "CSV".
  </p>
  {% if error %}
  <div style="color: red;">{{error}}</div>
  {% endif %}
    <input type="hidden" name="csrf_token" value="{{csrf_token}}" />
    
    <input type="file" name="voters_file" />
    <input type="submit" value="go" />
</form>

<div id="processing">
</div>

<div id="done" style="display:none;">
  OK, done uploading.<br />
  You can now <a href="./manage">view the list of voters</a>.
</div>

{% endblock %}
